-- GENERATED SPELL FOR [Earthen Rocksmasher] --


function spell0_7011(pUnit, Event) --@Battle Stance,Self--
pUnit:FullCastSpellOnTarget(7165,pUnit)
pUnit:RegisterEvent('Sorts_7011', 558, 1)
end

function spell1_7011(pUnit, Event) --@Strike,n/a--
pUnit:FullCastSpellOnTarget(12057,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7011', 640, 1)
end

function Sorts_7011(pUnit, Event)
local choix_sorts_7011 = math.random(0, 1)
if choix_sorts_7011 == 0 then
pUnit:RegisterEvent('spell0_7011', 1, 1)
end
if choix_sorts_7011 == 1 then
pUnit:RegisterEvent('spell1_7011', 1, 1)
end
end

function mob7011_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_7011', math.random(1500, 3000), 1)
end

function mob7011_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7011_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7011_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(7011, 1, 'mob7011_Action')
RegisterUnitEvent(7011, 2, 'mob7011_Leave')
RegisterUnitEvent(7011, 3, 'mob7011_Kill')
RegisterUnitEvent(7011, 4, 'mob7011_Die')
